package com.lightning.web.support.security.identity;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * IdentityManager used to get user's identity from HTTP request or HTTP session.
 * 
 * @author xiaoli
 */
public interface IdentityManager {
	public Identity getIdentity(HttpServletRequest request, HttpServletResponse response);

	public Identity getRequiredIdentity(HttpServletRequest request, HttpServletResponse response);

	public void storeIdentity(HttpServletRequest request, HttpServletResponse response, Identity identity);

	public void removeIdentity(HttpServletRequest request, HttpServletResponse response);
}
